1. Field of the Invention
The subject matter of the present application relates to the testing of computer programs, e.g., software and the like, and more specifically to a method of generating a test case for testing at least a portion of a program containing computer-readable instructions.
2. Description of the Related Art
Some existing techniques for testing a computer program, e.g., an application program, utilize a hit-and-miss approach for exercising the paths through the program. Such techniques typically do not acquire or utilize information to determine, prior to conducting a test, which parts of the program are linked together via multiple branch conditions. Such techniques typically do not attempt to determine paths which reach the deepest embedded functions of the program.
With such techniques, typically a random input generator is used to determine a set of the inputs on which a program branches from one path to another. When the program does not branch on one set of random generated inputs, the generator generates a new set of random inputs. It is then tested whether the program branches on the new set of random inputs. This process can be repeated many times until a set of inputs are determined which causes the program to branch to another path.
One consequence of relying upon a random input generator to supply a set of inputs for branching between different paths during testing is that such approach might not adequately cover the paths of the program. Although inputs are identified which cause the program to branch from some paths to other paths, no attempt is made to know the structure of the program and use knowledge of the program's structure to assure that the deeper functional elements of the program will be tested.